﻿using Microsoft.AspNetCore.Identity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZhiJiao.Models.Entities.Enums;

namespace ZhiJiao.Models.Entities
{
    public class User :IdentityUser
    {
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 用户类型： 0、平台用户  1、机构用户
        /// </summary>
        public UserType Type { get; set; }

        /// <summary>
        ///  所属机构(可为空)
        ///  Type="机构用户"时有值
        /// </summary>
        public Instruction? Instruction { get; set; }

        /// <summary>
        /// 可管辖机构
        /// </summary>
        public List<Instruction>? InstructionsInControl { set; get; }

        /// <summary>
        /// 用户头像
        /// </summary>
        public byte[]? ImageUrl { get; set; }


        /// <summary>
        /// 手机号
        /// </summary>
        public string Phone { get; set; }

        /// <summary>
        /// 姓名
        /// </summary>
        public string Name { get; set; }
    }
}
